//
//  NSString+Utility.h
//  LXVolunteer
//
//  Created by 李涛 on 15/5/20.
//  Copyright (c) 2015年 lexue. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSString (Utility)

@property (nonatomic,strong) NSString * successNoti;
@property (nonatomic,strong) NSString * failNoti;

@property (nonatomic,assign) NSUInteger realLength;
+ (NSString *)safeString:(NSString *)str;

- (CGSize)getSizeWithFont:(UIFont *)font constrainedToSize:(CGSize)size;

- (CGSize)getSizeWithFont:(UIFont *)font;

- (CGSize)getSizeWithAtt:(NSDictionary *)att ConstrainedToSize:(CGSize)size;
- (CGSize)getSizeWithFont:(UIFont *)font constrainedToSize:(CGSize)size AndLineHeight:(CGFloat)lineHeight;
- (CGSize)getSizeWithFont:(UIFont *)font constrainedToSize:(CGSize)size AndParagraphStyle:(NSParagraphStyle *)paragraphStyle;
//电话号码检测
- (BOOL)checkPhoneNum;

//获取下划线AttibutedString
- (NSAttributedString *)getAttributedStrWithUnderLine;

//获取下划线 并改变颜泽
- (NSAttributedString *)getAttributedStrWithUnderLineAndColor:(UIColor *)color;

- (NSString *)getMD5;

/**
 *  获取本地时间 格式年月日
 */
+ (NSString *)getCurrentTimeWithType:(NSString *)timeType;
/**
 *  去除空格 和 转行
 */
- (NSString *)getRealStr;

+ (NSString *)getTime:(NSString *)shijianchuo;


/**
 *  数量转换
 */
- (NSString *)getShotCount;
/**
 *  时间转换
 */
- (NSString *)getTimeFormat;

+  (NSString *)getTimeMonthDay:(NSString *)monthAndDay;

+ (NSString *)getWeekDayFordate:(NSString *)monthAndDay;

@end
